// react
import React, { useEffect } from "react";
import { Descriptions } from "antd";
import { observer } from "mobx-react";
// lib
import { state } from "./state";
// import { getOrderInfo } from "./controller";

function InfoModal() {
  useEffect(() => {
    if (state.editInfo) {
      // getOrderInfo(state.orderId);
    }
    return () => {
      //
    };
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [state.orderId]);

  return (
    <Descriptions bordered>
      <Descriptions.Item label="出库单号">{state.editInfo?.borrowId}</Descriptions.Item>
      {/* <Descriptions.Item label="所属店铺">{state.editInfo?.shopName}</Descriptions.Item>
      <Descriptions.Item label="订单状态">{state.editInfo?.orderStatus}</Descriptions.Item>
      <Descriptions.Item label="订单金额">{state.editInfo?.totalAmount}</Descriptions.Item>
      <Descriptions.Item label="优惠金额">{state.editInfo?.couponAmount}</Descriptions.Item>
      <Descriptions.Item label="实付金额">{state.editInfo?.totalActualAmount}</Descriptions.Item>
      <Descriptions.Item label="支付方式">{state.editInfo?.payChannel}</Descriptions.Item>
      <Descriptions.Item label="优惠券id">{state.editInfo?.couponUseId}</Descriptions.Item>
      <Descriptions.Item label="退款金额">{state.editInfo?.refundAmount}</Descriptions.Item>
      <Descriptions.Item label="订单类型">{state.editInfo?.orderType}</Descriptions.Item>
      <Descriptions.Item label="收货地址/自提店铺">{state.editInfo?.address}</Descriptions.Item>
      <Descriptions.Item label="运费">{state.editInfo?.freightAmount}</Descriptions.Item>
      <Descriptions.Item label="下单时间">{state.editInfo?.payTime}</Descriptions.Item>
      <Descriptions.Item label="预约时间">
        {state.editInfo?.expectedDeliveryStartTime}
      </Descriptions.Item>
      <Descriptions.Item label="自提时间/送达时间">
        {state.editInfo?.expectedDeliveryEndTime}
      </Descriptions.Item>
      <Descriptions.Item label="配送员">
        {state.editInfo?.delivererName}
      </Descriptions.Item>
      <Descriptions.Item label="配送员联系电话">
        {state.editInfo?.delivererPhoneNumber}
      </Descriptions.Item>
      <Descriptions.Item label="用户电话">
        {state.editInfo?.userPhoneNumber}
      </Descriptions.Item>
      <Descriptions.Item label="用户备注">
        {state.editInfo?.remarks}
      </Descriptions.Item>
      <Descriptions.Item label="遇到缺货">
        {state.editInfo?.illustrate} */}
      {/* </Descriptions.Item> */}
    </Descriptions>
  );
}

export default observer(InfoModal);